Business Process Execution Language (BPEL) may be used for defining how business processes interact with web services. In some instances, when a BPEL process is being executed, interaction with an external web service is necessary. Waiting for a response from the external web service or some other entity may take a significant amount of time, such as several minutes, hours, or days. When a response is required, rather than maintaining the BPEL process as active, it may be more efficient to temporarily suspend processing of the BPEL process to free memory and/or processing resources.
To suspend the BPEL process, dehydration may be performed. Dehydration may involve data related to the BPEL process being stored in a data storage structure, such as a database residing on a hard drive, until processing is to resume. Such dehydration may involve all values of variables of the BPEL process being stored and an indication of where in the BPEL code the BPEL process was suspended. This data may be stored as a data “blob” in the data storage structure. Once a response is received from the external web service, the blob may be “rehydrated,” such that the values of variables are reloaded from the data storage structure, and the BPEL process can continue being processed.
While temporarily storing variables and other data related to the BPEL process may be more efficient to free memory and/or processing resources, the amount of space necessary to store all of the variables related to the BPEL process may be significant. For example, some variables which may be based on XML may be many kilobytes or possibly megabytes in size. As such, dehydrating all of the variables of a BPEL process may require many megabytes of storage space. If a large number of BPEL processes are run concurrently, the amount of space necessary to store multiple dehydrated BPEL processes concurrently may be significant. Further, dehydrated BPEL processes that are no longer going to be rehydrated may remain stored until manually purged by a user. As this number of dehydrated BPEL processes grow, the amount of storage space consumed also grows.